﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DBLOG.BizTalk.BizTalkExplorerServices.Entities;
using System.ServiceModel.Web;

namespace DBLOG.BizTalk.BizTalkExplorerServices.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IBizTalkExplorer" in both code and config file together.
    [ServiceContract]
    public interface IBizTalkExplorer
    {
        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSError> GetErrors();

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSWarning> GetWarnings();

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSMessage> GetMessages();

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSMessage> GetSuspendedMessages();

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        BTSSummary GetSummary();

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSReceiveLocation> GetReceiveLocations();

        [OperationContract(Name="GetReceiveLocationsByApplication")]
        [WebGet(ResponseFormat=WebMessageFormat.Json, UriTemplate="{receivePortName}/ReceiveLocations")]
        List<BTSReceiveLocation> GetReceiveLocations(string receivePortName);

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSApplication> GetApplications();

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSSendPort> GetSendPorts();

        [OperationContract(Name="GetSendPortsByApplication")]
        [WebGet(ResponseFormat=WebMessageFormat.Json, UriTemplate="{applicationName}/SendPorts")]
        List<BTSSendPort> GetSendPorts(string applicationName);

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSReceivePort> GetReceivePorts();

        [OperationContract(Name="GetReceivePortsByApplication")]
        [WebGet(ResponseFormat=WebMessageFormat.Json, UriTemplate="{applicationName}/ReceivePorts")]
        List<BTSReceivePort> GetReceivePorts(string applicationName);

        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        List<BTSOrchestration> GetOrchestrations();

        [OperationContract(Name="GetOrchestrationsByApplication")]
        [WebGet(ResponseFormat=WebMessageFormat.Json, UriTemplate="{applicationName}/Orchestrations")]
        List<BTSOrchestration> GetOrchestrations(string applicationName);
    }
}
